package com.aiyige.model;

import com.aiyige.utils.StringUtils;
import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.io.Serializable;

/**
 * Created by xiachao on 2017/11/15.
 */

public class CommentEntity  implements Serializable,MultiItemEntity {
    private String id;
    private long createTime;
    private String content;
    private String user;
    private int userId;
    private int userLevel;
    private String userAvatar;
    private int praiseCount;
    private boolean iamPraised;
    private CommentForEntity commentFor;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return StringUtils.getTextString(content);
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getUser() {
        return StringUtils.getTextString(user);
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserLevel(int userLevel) {
        this.userLevel = userLevel;
    }

    public int getUserLevel() {
        return userLevel;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public String getUserAvatar() {
        return StringUtils.getTextString(userAvatar);
    }

    public void setPraiseCount(int praiseCount) {
        this.praiseCount = praiseCount;
    }

    public int getPraiseCount() {
        return praiseCount < 0 ? 0:praiseCount;
    }

    public void setIamPraised(boolean iamPraised) {
        this.iamPraised = iamPraised;
    }

    public boolean getIamPraised() {
        return iamPraised;
    }

    public void setCommentFor(CommentForEntity commentFor) {
        this.commentFor = commentFor;
    }

    public CommentForEntity getCommentFor() {
        return commentFor;
    }

    @Override
    public int getItemType() {
        return 0;
    }
}
